<template>
  <div class="app-container">
    <NavBar></NavBar>
    <!-- 轮播图 -->
    <div>
      <div class="block">
        <el-carousel height="500px" autoplay loop>
          <el-carousel-item v-for="(item, index) in picture" :key="index">
            <img class="picture" :src="item" alt="" />
          </el-carousel-item>
        </el-carousel>
      </div>
    </div>
    <!-- 房产展示 -->
    <div class="home">
      <div class="content" v-for="item in goodPicture" :key="item.h1">
        <div class="top">
          <img :src="item.picture" alt="" />
        </div>
        <div class="bottom">
          <h5>{{ item.h1 }}</h5>
        </div>
      </div>
    </div>
    <Footer></Footer>
    <!-- 浮动 -->
    <div class="app-footer">
      <img
        src="https://s1.ljcdn.com/feroot/pc/asset/img/home/iphone.png"
        alt=""
      />
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      picture: [
        require("@/assets/1.jpg"),
        require("@/assets/2.jpg"),
        require("@/assets/3.jpg"),
        require("@/assets/5.jpg"),
      ],
      goodPicture: [
        { picture: require("@/assets/11.jpg"), h1: "赛利公寓" },
        { picture: require("@/assets/12.jpg"), h1: "西雅图GAO联排别墅 " },
        { picture: require("@/assets/13.jpg"), h1: "独奏者" },
        { picture: require("@/assets/14.jpg"), h1: "UTOPIA MAIKHAO" },
      ],
    };
  },
};
</script>

<style lang="less" scoped>
.w1 {
  width: 1400px;
  height: 500px;
  margin: 2px auto;
}
.el-carousel-item {
  img {
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -100px;
  }
}
.picture {
  width: 100%;
  height: 497px;
}
.home {
  display: flex;
  height: 250px;
  justify-content: space-between;
  width: 1200px;
  margin: 10px auto;

  .content {
    height: 240px;
    width: 24%;
    &:hover {
      box-shadow: 3px 2px 5px 2px rgba(0, 0, 0, 0.5);
    }
  }
  .top {
    overflow: hidden;
    img {
      height: 200px;
      border-radius: 5px;
      width: 100%;
    }
  }
  .bottom {
    padding-top: 8px;
    text-align: center;
  }
}
.app-footer {
  position: fixed;
  bottom: -300px;
  left: 0;
  right: 0;
  height: 200px;
  background-color: #fff;
  img {
    width: 190px;
    display: inline-block;
    position: relative;
    bottom: 50px;
    vertical-align: top;
  }
}
</style>
